﻿namespace CYPlayer.ProjectViews
{
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Input;

    public partial class PreferencesView : UserControl
    {
        private PlayerWindow parent;

        public PreferencesView()
        {
            InitializeComponent();
            parent = (PlayerWindow)Window.GetWindow(this);
        }

        public PlayerWindow WindowParent
        {
            get
            {
                return this.parent ?? (this.parent = (PlayerWindow)Window.GetWindow(this));
            }
        }

        private void BackToPlayerClick(object sender, MouseButtonEventArgs e)
        {
            this.WindowParent.transitionConrol.ShowPage(
                null,
                typeof(PlayerView).Name);
        }
    }
}
